#pragma once
#include "CoolUIDefine.h"

class CUIImgGdiplus;

class COOLUI_CLASS CUICaptionButton
{
public:

    CUICaptionButton( HWND hWnd, UINT uID, UINT uImgID, IMGDIRECTION imgDir, UINT uImgCount, LRESULT hitCode = HTOBJECT );

    CUICaptionButton( HWND hWnd, UINT uID, LPCTSTR lpszImg, IMGDIRECTION imgDir, UINT uImgCount, LRESULT hitCode = HTOBJECT );

    virtual ~CUICaptionButton( void );

    void Draw( HDC hDC );

    const RECT GetBorder();

    UINT GetID()const;

    void SetPosition( int x, int y );

    SIZE GetSize();

    LRESULT GetHitCode()const;

    void SetPressed( BOOL bPress );

    void SetHovered( BOOL bHover );

    BOOL IsPressed()const;

    BOOL IsHovered()const;

protected:
    CUIImgGdiplus* GetImg();

private:
    UINT m_CtrlID;
    CUIImgGdiplus* m_pImg;
    int m_iCurStatus;
    LRESULT m_iHitCode;

    BOOL m_bHover;
    BOOL m_bPress;
    HWND m_hParent;
};

